//
//  ZYCApplianceRootHeaderView.m
//  ZDSC
//
//  Created by ZDTX on 2021/7/17.
//

#import "ZYCApplianceRootHeaderView.h"
#import "ZYCApplianceRootModel.h"
@interface ZYCApplianceRootHeaderView ()

@property (nonatomic, strong) UILabel *titleLabel;
@end
@implementation ZYCApplianceRootHeaderView
- (void)setModel:(ZYCApplianceRootModel *)model{
    _model = model;
    _titleLabel.text = model.menuName;
}
- (void)setSection:(NSString *)section{
    _section = section;
    _titleLabel.text = section;
}
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.titleLabel];

        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).offset(9.0f);
            make.centerY.equalTo(self);
        }];


    }
    return self;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [UILabel LabelWithFont:kSystemBoldFont(16.0f) titleColor:HEX_RGB(kTitleDrakBlackColor) textAlignment:ZZTextAlignmentLeft];
    }
    return _titleLabel;
}
@end
